<?php
namespace app\common\model;

use think\Db;
use think\Model;

/**   YSF
 *    设备日志表  Model
 *    Date: 2018/8/20
 * Class EquipmentLogModel
 * @package app\common\model
 */
class EquipmentLogModel extends Model
{
    // 表名
    protected $dbName = 'equipment_log';

    // 列表查询
    public function getAll($where=[], $limit=5, $field = '*', $order='create_time DESC')
    {
        $result = Db::name($this->dbName)
                    ->where($where)
                    ->field($field)
                    ->limit($limit)
                    ->order($order)
                    ->select();
        return $result;
    }

}